package com.douma.tool.db.tables;

import com.douma.tool.db.DbFieldDto;
import com.douma.tool.db.DbTypeEnum;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by haoxijun on 2019/12/9.
 */
public class TablesBaks {

    //标签关系表
    public static Map axg_mate_label() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("tableName", "axg_mate_label");
        map.put("tableNameDes", "标签关系表");
        List<DbFieldDto> dtoList = new ArrayList<DbFieldDto>();
        dtoList.add(new DbFieldDto("type", DbTypeEnum.INT_4, "notNull", "标签种类(1:客户标签;2:房产标签;3:业主标签)"));
        dtoList.add(new DbFieldDto("object_id", DbTypeEnum.VARCHAR_20, "notNull", "对象id"));
        dtoList.add(new DbFieldDto("label_id", DbTypeEnum.VARCHAR_20, "notNull", "标签id"));
        map.put("dtoList", dtoList);
        return map;
    }

    //标签信息表
    public static Map axg_inf_label() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("tableName", "axg_inf_label");
        map.put("tableNameDes", "标签信息表");
        List<DbFieldDto> dtoList = new ArrayList<DbFieldDto>();
        dtoList.add(new DbFieldDto("label_id", DbTypeEnum.VARCHAR_20, "notNull", "标签id"));
        dtoList.add(new DbFieldDto("ward", DbTypeEnum.VARCHAR_20, "notNull", "文本"));
        dtoList.add(new DbFieldDto("level", DbTypeEnum.INT_4, "100", "级别"));
        dtoList.add(new DbFieldDto("color", DbTypeEnum.VARCHAR_20, "#CCCCCC", "颜色"));
        map.put("dtoList", dtoList);
        return map;
    }

    //客户信息表
    public static Map axg_inf_customer() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("tableName", "axg_inf_customer");
        map.put("tableNameDes", "客户信息表");
        List<DbFieldDto> dtoList = new ArrayList<DbFieldDto>();
        dtoList.add(new DbFieldDto("customer_id", DbTypeEnum.VARCHAR_20, "notNull", "客户id"));
        dtoList.add(new DbFieldDto("name", DbTypeEnum.VARCHAR_20, "notNull", "姓名"));
        dtoList.add(new DbFieldDto("mobile", DbTypeEnum.VARCHAR_20, "notNull", "手机号"));
        dtoList.add(new DbFieldDto("status", DbTypeEnum.INT_4, "notNull", "状态(1:了解;2:观望;3:选择;4:订房;5:签单;6:过户;7:完成)"));
        dtoList.add(new DbFieldDto("wish", DbTypeEnum.TEXT, "NULL", "期望"));
        dtoList.add(new DbFieldDto("remarks", DbTypeEnum.VARCHAR_100, "NULL", "备注"));
        map.put("dtoList", dtoList);
        return map;
    }

    //业主信息表
    public static Map axg_inf_owner() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("tableName", "axg_inf_owner");
        map.put("tableNameDes", "业主信息表");
        List<DbFieldDto> dtoList = new ArrayList<DbFieldDto>();
        dtoList.add(new DbFieldDto("owner_id", DbTypeEnum.VARCHAR_20, "notNull", "业主id"));
        dtoList.add(new DbFieldDto("name", DbTypeEnum.VARCHAR_20, "notNull", "姓名"));
        dtoList.add(new DbFieldDto("mobile", DbTypeEnum.VARCHAR_20, "notNull", "手机号"));
        dtoList.add(new DbFieldDto("remarks", DbTypeEnum.VARCHAR_100, "NULL", "备注"));
        map.put("dtoList", dtoList);
        return map;
    }

    //小区信息表
    public static Map axg_inf_village() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("tableName", "axg_inf_village");
        map.put("tableNameDes", "小区信息表");
        List<DbFieldDto> dtoList = new ArrayList<DbFieldDto>();
        dtoList.add(new DbFieldDto("village_id", DbTypeEnum.VARCHAR_20, "notNull", "小区id"));
        dtoList.add(new DbFieldDto("name", DbTypeEnum.VARCHAR_100, "notNull", "小区名称"));
        dtoList.add(new DbFieldDto("type", DbTypeEnum.INT_4, "NULL", "类别(1:商品房;2:动迁房)"));
        dtoList.add(new DbFieldDto("address_road", DbTypeEnum.VARCHAR_100, "notNull", "位置路"));
        dtoList.add(new DbFieldDto("address_number", DbTypeEnum.VARCHAR_100, "notNull", "位置号"));
        dtoList.add(new DbFieldDto("unit", DbTypeEnum.INT_4, "notNull", "单位(1:号;2:幢;3:栋)"));
        dtoList.add(new DbFieldDto("age", DbTypeEnum.VARCHAR_20, "NULL", "年代"));
        dtoList.add(new DbFieldDto("avg_price", DbTypeEnum.DECIMAL, "NULL", "平均售价(万元)"));
        dtoList.add(new DbFieldDto("sell_count", DbTypeEnum.INT_4, "NULL", "在售数量"));
        dtoList.add(new DbFieldDto("avg_rent", DbTypeEnum.DECIMAL, "NULL", "平均租金(万元)"));
        dtoList.add(new DbFieldDto("rent_count", DbTypeEnum.INT_4, "NULL", "在租数量"));
        dtoList.add(new DbFieldDto("other_info", DbTypeEnum.TEXT, "NULL", "其他信息"));
        map.put("dtoList", dtoList);
        return map;
    }

    //房屋信息表
    public static Map axg_inf_house() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("tableName", "axg_inf_house");
        map.put("tableNameDes", "房屋信息表");
        List<DbFieldDto> dtoList = new ArrayList<DbFieldDto>();
        dtoList.add(new DbFieldDto("house_id", DbTypeEnum.VARCHAR_20, "notNull", "房屋id"));
        dtoList.add(new DbFieldDto("house_type", DbTypeEnum.INT_4, "notNull", "类型(1:电梯房;2-非电梯房;3-别墅;4-门店;5-厂房;6-仓库)"));
        dtoList.add(new DbFieldDto("house_name", DbTypeEnum.VARCHAR_100, "notNull", "房屋名称"));
        dtoList.add(new DbFieldDto("village_id", DbTypeEnum.VARCHAR_20, "notNull", "小区id"));
        dtoList.add(new DbFieldDto("number", DbTypeEnum.INT_4, "notNull", "号"));
        dtoList.add(new DbFieldDto("floor", DbTypeEnum.INT_4, "notNull", "楼"));
        dtoList.add(new DbFieldDto("room", DbTypeEnum.INT_4, "notNull", "室"));
        dtoList.add(new DbFieldDto("room_count", DbTypeEnum.INT_4, "NULL", "室数"));
        dtoList.add(new DbFieldDto("sitting_count", DbTypeEnum.INT_4, "NULL", "厅数"));
        dtoList.add(new DbFieldDto("toilet_count", DbTypeEnum.INT_4, "NULL", "卫数"));
        dtoList.add(new DbFieldDto("kitchen_count", DbTypeEnum.INT_4, "NULL", "厨数"));
        dtoList.add(new DbFieldDto("balcony_count", DbTypeEnum.INT_4, "NULL", "阳台数"));
        dtoList.add(new DbFieldDto("loft_count", DbTypeEnum.INT_4, "NULL", "阁楼数"));
        dtoList.add(new DbFieldDto("garden_count", DbTypeEnum.INT_4, "NULL", "花园数"));
        dtoList.add(new DbFieldDto("area", DbTypeEnum.DECIMAL, "notNull", "面积(平米)"));
        dtoList.add(new DbFieldDto("price", DbTypeEnum.DECIMAL, "notNull", "总价(万元)"));
        dtoList.add(new DbFieldDto("owner_id", DbTypeEnum.VARCHAR_100, "notNull", "业主id"));
        dtoList.add(new DbFieldDto("lock_status", DbTypeEnum.INT_4, "notNull", "数据状态(1:公开;2:权限内可见;3:本人可见)"));
        dtoList.add(new DbFieldDto("other_info", DbTypeEnum.TEXT, "NULL", "其他信息"));
        map.put("dtoList", dtoList);
        return map;
    }

}
